datasg  segment
maxlen  db  6
        db  ?
str1    db  6   dup(0)
datasg  ends

stacksg segment stack
    dw  40H dup(0)
stacksg ends

codesg  segment
    assume  ds:datasg, ss:stacksg, cs:codesg
start:  mov ax, datasg
        mov ds, ax
        lea dx, maxlen
        mov ax, 0a00h
        int 21H
        mov ax, 4c00h
        int 21H
codesg ends
    end start
